def dayUP(df):
    dayup = 1
    for i in range(365):
        if i %7 in [6,0]:
            dayup*=(1-0.01)
        else:
            dayup*=(1+df)
    return dayup

lo = 0.01
hi = 0.05
Dayup = 1
for i in range(365):
    Dayup*=(1+0.01)
dayup = dayUP((lo+hi)/2)
while dayup-Dayup>0.000001 or Dayup-dayup>0.000001:
    if dayup-Dayup>0.000001 :
        hi=(lo+hi)/2
        dayup = dayUP((lo+hi)/2)
    else:
        lo=(hi+lo)/2
        dayup = dayUP((lo+hi)/2)
print((lo+hi)/2)
    
